# Python pathlib模块用法详解
from pathlib import *
# 创建PurePath
path = PurePath("my_file.txt")
print(type(path))
print()

path = PurePath("http:", "c.biancheng.net", "python")
print(path)
print()

path = PureWindowsPath("http:", "c.biancheng.net", "python")
print(path)
print()

path = PurePath()
print(path)

path = PurePath(".")
print(path)
print()

path = PurePath("/home/yangjun/./my_file.txt")
print(path)
print()

# Unix风格的路径区分大小写
print(PurePosixPath("C://my_file.txt") == PurePosixPath("c://my_file.txt"))

# Windows风格的路径不区分大小写
print(PureWindowsPath("C://my_file.txt") == PureWindowsPath("c://my_file.txt"))
print()

path = PurePath("C://")
print(path / "my_file.txt")
print()

path = PurePath("C://", "my_file.txt")
print(str(path))
